﻿@model Planisoft.Entities.Contrato

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>	

<script type = "text/javascript">
	$(function(){
		$("#FechInicio").datepicker({
			changeMonth: true,
			changeYear: true,
			dateFormat: "dd-mm-yy",
			yearRange: "2012:2020"
		})
		$("#FechFin").datepicker({
			changeMonth: true,
			changeYear: true,
			dateFormat: "dd-mm-yy",
			yearRange: "2012:2020"
		})
	})
</script>
	
<div class="editor-field" hidden ="true" >
	@Html.TextBox("id", "id")    
</div>


@using (Html.BeginForm())
{
	@Html.ValidationSummary(true)
	<fieldset>
		<legend>Nuevo Contrato</legend>

		@*<div class="editor-label" hidden = "true">
			@Html.LabelFor(model => model.IdContrato)
		</div>
		<div class="editor-field" hidden ="true">			
			@Html.EditorFor(model => model.IdContrato)
			@Html.ValidationMessageFor(model => model.IdContrato)
		</div>*@

		

		<div class="editor-label" hidden="true">
			@Html.LabelFor(model => model.IdTrabajador)
		</div>
		<div class="editor-field" hidden = "true">
			@Html.DropDownList("IdTrabajador")			
			@Html.ValidationMessageFor(model => model.IdTrabajador)
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.IdTipoContrato)
		</div>
		<div class="editor-field">
			@Html.DropDownList("IdTipoContrato")
			@Html.ValidationMessageFor(model => model.IdTipoContrato)
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.IdSituacionContrato)
		</div>
		<div class="editor-field">
			@Html.DropDownList("IdSituacionContrato")
			@Html.ValidationMessageFor(model => model.IdSituacionContrato)
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.IdAreaTrabajo)
		</div>
		<div class="editor-field">
			@Html.DropDownList("IdAreaTrabajo")
			@Html.ValidationMessageFor(model => model.IdAreaTrabajo)
		</div>

		<div class="editor-label" hidden="true">
			@Html.LabelFor(model => model.IdFinalizaContrato)
		</div>
		<div class="editor-field" hidden="true">
			@Html.EditorFor(model => model.IdFinalizaContrato)
			@Html.ValidationMessageFor(model => model.IdFinalizaContrato)
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.FechInicio)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.FechInicio)
			@Html.ValidationMessageFor(model => model.FechInicio)
		</div>

		<div class="editor-label">
			@Html.Label("Fecha Finalización")
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.FechFin)
			@Html.ValidationMessageFor(model => model.FechFin)
		</div>

		<div class="editor-label" >
			@Html.LabelFor(model => model.Sueldo)
		</div>
		<div class="editor-field" >
			@Html.EditorFor(model => model.Sueldo)
			@Html.ValidationMessageFor(model => model.Sueldo)
		</div>

		<p>
			<input type="submit" value="Guardar" />
		</p>
	</fieldset>
}

<div>
	@Html.ActionLink("Back to List", "Index")
</div>
